<?php

	class Photos extends Controller {

		function __construct(){
			parent::__construct();
		}
		function index() {
			$this->view->render('Page/Photos');
		}

		public function Get_all_photo () {
			if(isset($_SESSION["id"])) {
				$this->view->all_photo = $this->model->get_all_photos(trim($_SESSION["id"]));
				$this->view->render('Page/Photos');
			} else {  $this->view->render('Page/index'); }
		}

		public function Get_all_albums () {
			if(isset($_SESSION["id"])) {
				$this->view->all_albums = $this->model->get_all_albums(trim($_SESSION["id"]));
				$this->view->render('Page/Photos');
			} else {  $this->view->render('Page/index');}
		}

		public function Get_all_photo_in_album ($albums_id = false) {
			if(isset($albums_id)) {
				$this->view->all_photo_by_album_id = $this->model->all_photo_by_album_id(trim($albums_id));
				$this->view->render('Page/Photos');
			} else {  $this->view->render('Page/index');}
		}


	}
?>